local skel = fk.CreateSkill {
  name = "#emo__neixun_viewas",
}

skel:addEffect("viewas", {
  card_filter = function (self, player, to_select, selected)
    local num = self.emo__neixun
    return num and #selected < num and table.contains(player.player_cards[Player.Hand], to_select)
  end,
  view_as = function (self, player, cards)
    local num = self.emo__neixun
    if num and #cards == num then
      local card = Fk:cloneCard("ex_nihilo")
      card:addSubcards(cards)
      card.skillName = "emo__neixun"
      return card
    end
  end,
})

return skel
